<?php
/**
 * Created by PhpStorm.
 * User: EDZ
 * Date: 2020/6/22
 * Time: 16:55
 */

namespace DesignPatterns\Behavioral\Strategy;


class Context
{
    /** @var Strategy */
    private $strategy;

    public function __construct(Strategy $strategy)
    {
        $this->strategy = $strategy;
    }

    public function executeStrategy(int $num1, int $num2) {
        return $this->strategy->doOperation($num1, $num2);
    }
}